<!--
 * @Author: CNN 969682281@qq.com
 * @Date: 2024-01-22 15:04:08
 * @LastEditors: 陈妮娜 969682281@qq.com
 * @LastEditTime: 2024-03-20 16:02:59
 * @FilePath: \zdgy\zdgy\src\views\sampleManage\collection\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div class="tableInfo" id="tableInfoBox">
    <!-- <TableLyout :treelength="treelength"> -->
    <div class="tab">
      <div
        v-for="(data, index) in typeData"
        :key="data.value"
        @click="changeType($event, index)"
      >
        <div
          class="btn"
          :style="{
            color: data.show === true ? '#fff' : '#343639',
            background: data.show === true ? '#006ADB' : '#fff',
          }"
        >
          {{ data.text }}
        </div>
      </div>
    </div>

    <TableLyout v-show="typeData[0].show">
      <template v-slot:serchbox>
        <publicForm
          ref="publicForm"
          @yj_searchForm="yj_searchForm"
          lableWidth="110px"
          :formObj="searchObj_laboratory"
          :formData="getList"
          @selectCompanyid="selectCompanyid"
        >
        </publicForm>
      </template>

      <template v-slot:tabcom>
        <div class="tableInfo">
          <publicForm
            class="textareaFrom"
            ref="publicForm"
            lableWidth="180px"
            :formObj="formObj"
            :formData="formData"
            :timestamp="formData.fFile"
            :fileList="fSourcefileList"
          >
          </publicForm>
        </div>
      </template>
    </TableLyout>

    <TableLyout v-show="typeData[1].show">
      <template v-slot:serchbox>
        <publicForm
          ref="publicForm"
          @yj_searchForm="getTesterForm"
          lableWidth="110px"
          :formObj="searchObj"
          :formData="getList"
          @selectCompanyid="selectCompanyid"
        >
        </publicForm>
      </template>

      <template v-slot:tabcom>
        <div class="tableInfo">
          <div class="app-container-btn">
            <el-button
              :disabled="item.disabled"
              type="primary"
              v-for="(item, index) in btnObj"
              :key="index"
              @click="getBtnName(item.fEncode, item.fOrder, 1)"
              >{{ item.fFullname }}</el-button
            >
          </div>
          <tableData
            :page="getList.page"
            :pageSize="getList.pageSize"
            :stripe="false"
            height="100%"
            :config="table_config"
            :dataList="tableData"
            :loading="loading"
            @click-change="rowChange"
            :info="queryCriteriaData"
            :total="queryCriteriaData.total"
            :pageNum.sync="getList.page"
            :limit.sync="getList.pageSize"
            @pagination="getTesterForm(getList)"
            @ClickOnLine="yj_viewForm"
          />
        </div>
      </template>
    </TableLyout>

    <TableLyout v-show="typeData[2].show">
      <template v-slot:serchbox>
        <publicForm
          ref="publicForm"
          @yj_searchForm="getLabEquipForm"
          lableWidth="110px"
          :formObj="searchObj_device"
          :formData="getList"
          @selectCompanyid="selectCompanyid_device"
        >
        </publicForm>
      </template>

      <template v-slot:tabcom>
        <div class="tableInfo">
          <div class="app-container-btn">
            <el-button
              :disabled="item.disabled"
              type="primary"
              v-for="(item, index) in btnObj_device"
              :key="index"
              @click="getBtnName(item.fEncode, item.fOrder, 2)"
              >{{ item.fFullname }}</el-button
            >
          </div>
          <tableData
            :page="getList.page"
            :pageSize="getList.pageSize"
            :stripe="false"
            height="100%"
            :config="table_config_device"
            :dataList="tableData_device"
            :loading="loading"
            @click-change="rowChange_device"
            :info="queryCriteriaData_device"
            :total="queryCriteriaData_device.total"
            :pageNum.sync="getList.page"
            :limit.sync="getList.pageSize"
            @pagination="getLabEquipForm(getList)"
            @ClickOnLine="yj_viewForm_device"
          />
        </div>
      </template>
    </TableLyout>

  </div>
</template>
<script src="./index.js"></script>
<style scoped lang="less">
@import "./index.less";
</style>